import request from '@/utils/request'
import { download} from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 订单列表
export function jishiList(query) {
  return request({
      url: '/admin/jishi/list',
      method: 'get',
      params: query
  });
}
//所在城市
export function areaList(query) {
    return request({
        url: '/admin/jishi/area/list',
        method: 'get',
        params: query
    });
}
//列表操作修改技师状态
export function workableEdit(data) {
    return request({
      url: '/admin/jishi/workable',
      method: 'put',
      data: data
    })
}
export function robotFlagEdit(data) {
  return request({
    url: '/admin/jishi/robotFlag',
    method: 'put',
    data: data
  })
}
//新增
export function jishiAdd(data) {
    return request({
      url: '/admin/jishi',
      method: 'post',
      data: data
    })
}
// 修改
export function jishiEdit(data) {
    return request({
      url: '/admin/jishi',
      method: 'put',
      data: data
    })
}
// 修改——查询单条数据
export function detailsJishi(ids) {
    return request({
      url: '/admin/jishi/' + parseStrEmpty(ids),
      method: 'get'
    })
}
// 删除
export function jishiDel(ids) {
    return request({
      url: '/admin/jishi/' + ids,
      method: 'delete'
    })
}
//删除
export function deleteOssFileByFileName(query) {
    return request({
        url: '/oss/deleteOssFileByFileName',
        method: 'delete',
        params: query
    });
}
//技师招募列表
export function jishiApplyList(query) {
    return request({
        url: '/admin/jishi-apply/list',
        method: 'get',
        params: query
    });
}
//技师招募-删除
export function jishiApplyDel(ids) {
    return request({
      url: '/admin/jishi-apply/' + ids,
      method: 'delete'
    })
}
//技师报备列表
export function reportList(query) {
    return request({
        url: '/admin/report/list',
        method: 'get',
        params: query
    });
}
//服务项目列表
export function projectsList(ids) {
    return request({
      url: '/admin/jishi/projects/' + parseStrEmpty(ids),
      method: 'get'
    })
}
//修改服务项目列表
export function projectsEdit(data) {
    return request({
      url: '/admin/jishi/projects',
      method: 'put',
      data: data
    })
}

// 修改实名认证——查询单条数据
export function detailsRealJishi(userName) {
  return request({
    url: '/admin/jishi/real/' + parseStrEmpty(userName),
    method: 'get'
  })
}

// 修改实名认证
export function jishiEditReal(data) {
  return request({
    url: '/admin/jishi/real',
    method: 'put',
    data: data
  })
}


// 修改银行卡信息——查询单条数据
export function detailsBankJishi(userName) {
  return request({
    url: '/admin/jishi/bank/' + parseStrEmpty(userName),
    method: 'get'
  })
}

// 修改银行卡信息
export function jishiEditBank(data) {
  return request({
    url: '/admin/jishi/bank',
    method: 'put',
    data: data
  })
}

// 修改服务次数
export function jishiEditFuwuNum(data) {
  return request({
    url: '/admin/jishi/fuwuNum',
    method: 'put',
    data: data
  })
}

// 修改银行卡信息——查询单条数据
export function jishiRemarkList(query) {
  return request({
    url: '/admin/jishi/remark/list',
    method: 'get',
    params: query
  })
}

// 修改备注
export function jishiRemarkAdd(data) {
  return request({
    url: '/admin/jishi/remark',
    method: 'post',
    data: data
  })
}

// 删除备注
export function jishiRemarkDelete(id) {
  return request({
    url: '/admin/jishi/remark' + parseStrEmpty(id),
    method: 'delete',
  })
}